<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link type="text/css" rel="stylesheet" media="all"
	href="${pageContext.request.contextPath}/css/global.css" />
<link type="text/css" rel="stylesheet" media="all"
	href="${pageContext.request.contextPath}/css/global_color.css" />
</head>
<body>
	<!--Logo区域开始-->
	<div id="header">
		<img src="${pageContext.request.contextPath}/images/logo.png"
			alt="logo" class="left" /> <a href="#">[退出]</a>
	</div>
	<!--Logo区域结束-->
	<!--导航区域开始-->
	<%@ include file="../head.jsp" %>
	<!--导航区域结束-->
	<!--主要区域开始-->
	<div id="main">
		<!--保存操作的提示信息-->
		<div id="save_result_info" class="save_fail">资费修改失败！数据并发错误。</div>
		<form
			action="${pageContext.request.contextPath}/service/serviceupdate.do"
			method="post" class="main_form">
			<!--必填项-->
			<div class="text_info clearfix">
				<span>业务账号ID：</span>
			</div>
			<div class="input_info">
				<input type="text" name="sid" value="${service.sid}" readonly
					class="readonly" />
			</div>
			<div class="text_info clearfix">
				<span>OS 账号：</span>
			</div>
			<div class="input_info">
				<input type="text" value="${service.sosname}" readonly
					class="readonly" />
			</div>
			<div class="text_info clearfix">
				<span>服务器 IP：</span>
			</div>
			<div class="input_info">
				<input type="text" value="${service.sip}" readonly class="readonly" />
			</div>
			<div class="text_info clearfix">
				<span>资费类型：</span>
			</div>
			<div class="input_info">
				<select class="width150" name="scostname">
					<option
						<c:if test="${service.scostname=='包20小时'}"> selected="selected"</c:if>>包20小时</option>
					<option
						<c:if test="${service.scostname=='包40小时'}"> selected="selected"</c:if>>包40小时</option>
					<option
						<c:if test="${service.scostname=='包60小时'}"> selected="selected"</c:if>>包60小时</option>
					<option
						<c:if test="${service.scostname=='包月'}"> selected="selected"</c:if>>包月</option>
				</select>
			</div>
			<!--操作按钮-->
			<div class="button_info clearfix">
				<input type="submit" value="保存" class="btn_save" /> <input
					type="button" value="取消" class="btn_save"
					onclick="location.href='${pageContext.request.contextPath}/service/showServicelist.do';" />
			</div>
			<p>
				业务说明：<br /> 1、修改资费后，点击保存，并未真正修改数据库中的数据；<br /> 2、提交操作到消息队列；<br />
				3、每月月底由程序自动完成业务所关联的资费；
			</p>
		</form>
	</div>
	<!--主要区域结束-->
	<div id="footer"></div>
	<script type="text/javascript">
            //保存成功的提示信息
            var i = "${requestScope.flag1}";
            if(i == '1'){
            	document.getElementById("save_result_info").innerHTML="保存成功!";
            	showResult();
            }
            if(i == '0'){
            	document.getElementById("save_result_info").innerHTML="保存失败!!!!!!!!!!!!";
            	showResult();
            }
            function showResult() {
            	
                showResultDiv(true);
                window.setTimeout("showResultDiv(false);", 3000);
            }
            function showResultDiv(flag) {
                var divResult = document.getElementById("save_result_info");
                if (flag)
                    divResult.style.display = "block";
                else
                    divResult.style.display = "none";
            }
        </script>
</body>
</html>
